#ifndef TASK_MANAGER_H
#define TASK_MANAGER_H

#include "Task.h"
#include <vector>
#include <string>

using namespace std;

vector<Task> List; 
vector<Task> &taskList=List;
class TaskManager {
public:
    TaskManager(const string& dataFile);
    
    bool addTask(const Task& task);
    bool deleteTask(int id);
    void viewScheduleByDateRange();
    bool saveToFile() const;
    const vector<Task>& getTasks() const;

private:
    bool isUnique(const Task& task) const;

    vector<Task> &tasks_=List;
    int nextId_ = 1;
    string dataFile_;
};

#endif
